home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / ds40bpds.zip / ERRDEMO.BAS < prev    next >
BASIC Source File  |  1991-10-24  |  1KB  |  24 lines

  1. ' $INCLUDE: 'DOORSORC.INT'
  2. ON ERROR GOTO ErrorHandle:                      ' Setup error handler
  3. PROGNAME$ = "CarrierLossError Demo"             ' Door name
  4. RELEASE$ = "1.0"                                ' Door version
  5. CALL ClrScrn                                    ' Clear the screen
  6. CLOSE #1                                        ' Close the config file
  7.  
  8. CarrierLossError = Yes                                                  ' Turn the CarrierLossError feature on
  9. CALL Send("Drop carrier within the next 30 seconds!", No, Yes, 11)      ' Display text
  10. CALL WaitASec(30)                                                       ' Wait for 30 seconds
  11. CALL ExitDoor                                                           ' End door
  12.  
  13. ErrorHandle:
  14.    IF ERR = 255 THEN
  15.       CALL Send("Carrier drop handling is being done now.", No, Yes, 12)' Display text
  16.       RESUME                                                            ' Return control to Exitdoor to end door
  17.    END IF
  18.    ' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  19.    ' !! This is the ONLY time you should ever use the PRINT and END commands !!
  20.    ' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  21.    PRINT "Error occured - " + STR$(ERR)                                 ' Display error code
  22.    END                                                                  ' End program
  23.  
  24.